package com.sxhalo.fsms.mapper;

import com.sxhalo.fsms.domain.DeviceLinkageRecord;
import com.sxhalo.fsms.domain.DeviceRunningStateUpdateTime;
import com.sxhalo.fsms.domain.DeviceRunningStateUpdateTimeKey;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;

public interface DeviceRunningStateUpdateTimeMapper {
    int deleteByPrimaryKey(DeviceRunningStateUpdateTimeKey key);

    int insert(DeviceRunningStateUpdateTime record);

    int insertSelective(DeviceRunningStateUpdateTime record);

    DeviceRunningStateUpdateTime selectByPrimaryKey(DeviceRunningStateUpdateTimeKey key);

    int updateByPrimaryKeySelective(DeviceRunningStateUpdateTime record);

    int updateByPrimaryKey(DeviceRunningStateUpdateTime record);

    int getCount(@Param("where")String where);

    List<DeviceRunningStateUpdateTime> findWhereList(@Param("where")String where, @Param("order")String order);

    List<DeviceRunningStateUpdateTime> findPagerList(@Param("start")Integer start, @Param("length")Integer length, @Param("where")String where, @Param("order")String order);


    //统计设备各运行状态数量
    List<HashMap> totalDeviceState(@Param("where")String   where);

    List<HashMap> totalRunStateByDevice(@Param("where")String   where);


    List<HashMap> totalRunStateByState( @Param("where")String   where,@Param("type")String type,@Param("date")String date);
}